package com.nuoniu.sibanyun.service.erp;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nuoniu.sibanyun.entity.dto.ErpNumberSetSearchDto;
import com.nuoniu.sibanyun.entity.erp.ErpNumberSet;
import com.nuoniu.sibanyun.entity.vo.SimpleErpNumberSetVo;
import com.nuoniu.sibanyun.userThread.UserInfo;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 编号设置  服务类
 * </p>
 *
 * @author baiqiang
 * @since 2020-11-02
 */
public interface IErpNumberSetService extends IService<ErpNumberSet> {

    /**
     * 初始化
     * @param userInfo
     * @param accountId
     */
    void initData(UserInfo userInfo, Integer accountId);

    /**
     * 查询 默认单据编码数据
     */
    List<ErpNumberSet> liseDefErpNumberSet();

    /**
     * 分页获取
     * @author 小啊刚
     * @date 2020-11-20
     */
    Page<ErpNumberSet> pageList(Page page, ErpNumberSet numberSet);

    List<SimpleErpNumberSetVo> listErpNumberSet(ErpNumberSetSearchDto erpNumberSetSearchDto);

    List<SimpleErpNumberSetVo> listErpNumberParentList(String moduleCode);

    /**
     * 获取编码
     * @author 小啊刚
     * @date 2020-11-21
     */
    String getCode(ErpNumberSet numberSet, String code);

    ErpNumberSet getByCode(String codeType);

    /**
     * 保存编码设置
     * @author 小啊刚
     * @date 2021-10-14
     */
    void saveNumberSet(ErpNumberSet numberSet);

    /**
     * 删除
     * @author 小啊刚
     * @date 2021-10-20
     */
    void deleteById(Long id);

    /**
     * 获取编码设置
     * @author 小啊刚
     * @date 2021-10-23
     */
    ErpNumberSet getByCode(String codeTyp, Integer companyId, Integer currentAccountId);
}
